package com.menker.app.biz;

import org.parceler.Parcel;


@Parcel
public class WebPageInfo extends PageInfo {

    public static final String EXTRA_NAME = WebPageInfo.class.getName();

    public boolean toolbarUpButtonEnabled;

    public String url;

    public String pageId;

    public String pageParams;

    public boolean byTaobaoUrl = false;

    public WebPageInfo() {
        super();
    }

    /**
     * 有Toolbar,带回退按钮
     * @param
     */
    public WebPageInfo(String title, String url) {
        this(title, url, true, true, "", "");
    }

    /**
     * 没有Toolbar
     * @param url
     */
    public WebPageInfo(String url, boolean toolbarVisible) {
        this("", url, toolbarVisible, false, "", "");
    }

    public WebPageInfo(String title, String url,
                       int toolbarTitleColor, int toolbarBgColor) {
        this(title, url, true, false, toolbarTitleColor, toolbarBgColor);
    }

    public WebPageInfo(String title, String url,
                       String toolbarTitleHexColor, String toolbarBgHexColor) {
        this(title, url, true, false, toolbarTitleHexColor, toolbarBgHexColor);
    }

    public WebPageInfo(String title, String url, boolean toolbarUpButtonEnabled,
                       String toolbarTitleColor, String toolbarBgColor) {
        this(title, url, true, toolbarUpButtonEnabled, toolbarTitleColor, toolbarBgColor);
    }

    public WebPageInfo(String title, String url,
                       boolean toolbarVisible, boolean toolbarUpButtonEnabled,
                       int toolbarTitleColor, int toolbarBgColor) {
        super(title, toolbarVisible, toolbarTitleColor, toolbarBgColor);
        this.url = url;
        this.toolbarUpButtonEnabled = toolbarUpButtonEnabled;
    }

    public WebPageInfo(String title, String url,
                       boolean toolbarVisible, boolean toolbarUpButtonEnabled,
                       String toolbarTitleHexColor, String toolbarBgHexColor) {
        super(title, toolbarVisible, toolbarTitleHexColor, toolbarBgHexColor);
        this.url = url;
        this.toolbarUpButtonEnabled = toolbarUpButtonEnabled;
    }
}
